<?php
// +----------------------------------------------------------------------
//            -------------------------
//           /   / ----------------\  \
//          /   /             \  \
//         /   /              /  /
//        /   /    /-------------- /  /
//       /   /    /-------------------\  \
//      /   /                   \  \
//     /   /                     \  \
//    /   /                      /  /
//   /   /      /----------------------- /  /
//  /-----/      /---------------------------/
// +----------------------------------------------------------------------
// | Copyright (c) 2016 http://baimifan.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: Sage 2016/7/1  14:37
// +----------------------------------------------------------------------
namespace Common\Model;
use Think\Model\ViewModel;

class ApplyView  extends ViewModel{
    protected $tableName ='Activity_apply';
    public $viewFields = array(
        'Activity_apply'=>array('apply_id', 'activity_id', 'user_id', 'pay_id', 'is_applyfree', 'discount_apply', 'contactor', 'create_time', 'is_refund', 'refund_id','_type'=>'LEFT',"is_print"),
        'Activity'=>array( 'title', 'content', 'a_logo', 'apply_total', 'apply_num', 'price_apply', 'price_material', 'activity_start', 'activity_end', 'apply_start', 'apply_end', 'num_deduct','_on'=>'Activity_apply.activity_id=Activity.activity_id','_type'=>'LEFT'),
        'Pay'=>array(  'status'=>'pay_status', 'type'=>'pay_type', 'way'=>'pay_way', 'summary', 'money', 'money_real', 'money_zero', 'create_time'=>'pay_create_time','_on'=>'Pay.pay_id=Activity_apply.pay_id','_type'=>'LEFT'),
        'Card'=>array('card_id','_on'=>'Card.user_id=Activity_apply.user_id')
    );
}